//引入vue
import Vue from 'vue'

//main.js引入VueRouter构造函数
import VueRouter from 'vue-router'
import Find from '../view/Find.vue'
import My from '../view/My.vue'
import Part from '../view/Part.vue'

//安装插件  - 帮助我们注册全局组件  router-view router-link
Vue.use(VueRouter)

const router = new VueRouter({
  routes:[
    {
      path:'/find',
      component:Find
    },
    {
      path:'/my',
      component:My
    },
    {
      path:'/part/:name',
      component:Part
    },
  ]
})

export default router